textArea.with{
    def selection = selection[0].clone()
    def down = 0
    selectedText = selectedText.toLowerCase().replaceAll("_[^_]"){
        down++
        it[1].toUpperCase()
    }
    addToSelection(new org.gjt.sp.jedit.textarea.Selection.Range(selection.start, selection.end - down))
}
